/**
 * Created by yoyoyk on 2017/5/12.
 */

import Relay from "react-relay";
export default class saveProcessDemand extends Relay.Mutation {

    getMutation() {
        return Relay.QL`mutation { saveProcessDemand }`;
    }

    getVariables() {
        return {
            argsInput: {
                processDemandId:this.props.processDemandId,
                pdId:this.props.pdId,
                careContent:this.props.careContent,
                imgJson:this.props.imgJson,
                fileJson:this.props.fileJson
            }
        }
    }

    getFatQuery() {
        return Relay.QL`fragment on saveProcessDemandPayload {
            clientMutationId
            saveProcessDemand{
                    processDemand{
                        fileJson
                        imgJson
                        pdId
                        processDemandId
                        careContent
                    }
                    errorCode
                    value
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on saveProcessDemandPayload  {
                      clientMutationId
                         saveProcessDemand{
                    processDemand{
                        fileJson
                        imgJson
                        pdId
                        processDemandId
                        careContent
                    }
                    errorCode
                    value
            }
                 }
            `]
        }];
    }

}
